import org.molamil.acto.commands.controller.AbstractCommandsController;
import org.molamil.acto.commands.factory.XmlCommandFactory;
import org.molamil.acto.core.EventConstants;
import org.molamil.acto.core.ExternalConfProvider;
import org.molamil.acto.core.Logger;
import org.molamil.commons.EventUtil;

/**
 * @author Jorge Hernandez
 */
class org.molamil.acto.commands.controller.XmlCommandsController extends AbstractCommandsController 
														  		 implements ExternalConfProvider {
	
	
	// Properties
	
	private static var log:Logger = Logger.getLogger("XmlCommandsController");
	
	
	// Constructor
	
	public function XmlCommandsController() {
		log.debug("Constructor");	
	}
	
	
	// Functions
	
	public function loadConf(source:Object):Void {
		log.info("loadConf()");
		factory = new XmlCommandFactory();
		EventUtil.propagate(XmlCommandFactory(factory), this, EventConstants.COMMANDS_CONF_LOAD, {target: this});
		EventUtil.propagate(XmlCommandFactory(factory), this, EventConstants.CONF_LOAD_ERROR, {target: this});
		XmlCommandFactory(factory).loadConf(source);
	}

	
}